Repository navigation
Migrate indexing::LFS to task system, rather than ringbuffer - #7955
Merged
Amaury Chamayou (achamayou) merged 15 commits intoSep 15, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR migrates the indexing LFS (large-file cache) path away from ringbuffer-based host messaging and onto the task system, so LFS store/fetch operations are scheduled as ordered tasks rather than sent to a host-side handler.
Changes:
- Replace ringbuffer messaging for LFS with an
OrderedTasksqueue backed by aJobBoard, and perform disk I/O fromEnclaveLFSAccess. - Update indexing tests to drive LFS I/O by draining a
JobBoard(synchronously inlfs.cpp, via a flusher thread inindexing.cpp). - Remove the obsolete ringbuffer message types and host-side
LFSFileHandlerplumbing.
Custom instructions used:
.github/copilot-instructions.md.github/instructions/reviewing.instructions.md
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/indexing/test/lfs.cpp | Switches LFS test plumbing from ringbuffers to draining a JobBoard. |
| src/indexing/test/indexing.cpp | Replaces ringbuffer flushing thread with a JobBoard task-draining thread for LFS. |
| src/indexing/lfs_ringbuffer_types.h | Removes LFS ringbuffer message definitions (no longer used). |
| src/indexing/enclave_lfs_access.h | Implements LFS store/fetch via ordered tasks and direct file I/O under .index. |
| src/host/run.cpp | Removes registration of the host-side LFS ringbuffer message handler. |
| src/host/lfs_file_handler.h | Removes the host-side LFS file handler implementation. |
| src/enclave/enclave.h | Instantiates EnclaveLFSAccess on the main job board and removes ringbuffer handler registration. |
Amaury Chamayou (achamayou)
approved these changes
Jul 18, 2026
Harden task-based LFS reads against stream failures and clarify LFS access names in tests.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use a compact enum representation and explicit aggregate initializers for blob read outcomes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Amaury Chamayou (achamayou)
marked this pull request as ready for review
September 13, 2026 19:25
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Host-controlled cache files can trigger unbounded allocation or abort the node through malformed encrypted data.
Get a fresh assessment by requesting another Copilot review.
Review details
- Files reviewed: 7/7 changed files
- Comments generated: 2
- Review effort level: Balanced
The contents of the .index directory are untrusted. A file truncated below the size of a GCM header made GcmCipher::deserialise throw out of the fetch action, and a file larger than physical memory was read into a vector before decryption. Both escaped try_do_task and aborted the node, instead of being reported as Corrupt so the strategy can re-index. Catch the deserialisation failure in verify_and_decrypt, and bound the admitted file size by the largest blob this instance has stored, which is published before the write is queued. Only this instance can produce a decryptable file, so any larger file is invalid without reading it. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep the task-based LFS implementation while adopting the shared time-bound logger location from main. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I could have sworn I opened this yesterday? But apparently not.